package com.xb.loan.util.exception;

import com.xb.loan.util.ResultJson;

/**
 * SOA层发生业务数据不合法时抛出此异常.
 * Created by  on 14-10-20.
 */
public class ServiceDataException extends RuntimeException {

    private static final long serialVersionUID = 3895981970668254319L;

    private Integer code;

    public ServiceDataException(Integer code, String message) {
        super(message);
        this.code = code;
    }
    
    public ServiceDataException(String message, Throwable cause) {
		super(message, cause);
	}

    public ServiceDataException(Integer code) {
        super(ResultJson.msg.get(code));
        this.code = code;
    }

    public int getCode() {
        return code;
    }

}
